import java.io.*;
import java.util.Random;

public class CreatByte {
    public static void main(String[] args) {
        File file = new File("shifft.dat");
        if(!file.exists())
        {
            try {
                file.createNewFile();
            }
            catch (IOException e){
                System.out.println(e.toString());
            }
        }
        try {
            Writer writer = new FileWriter(file);
            BufferedWriter bufferedWriter = new BufferedWriter(writer);
            Random random = new Random();
            for(int i = 0; i < 100; i++)
            {
                int num = random.nextInt(100);
                System.out.println(num);
                bufferedWriter.write(num + " ");
            }
            bufferedWriter.close();
        }
        catch (IOException e){
            System.out.println(e.toString());
        }
    }
}
